package org.example.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MvcConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/goods/upload/pic/**")//这个路径随便起自动去file:/Users/zhaowenting/Desktop/upload/file/253583-WechatIMG35jpg/路径下去查找
                .addResourceLocations("file:/Users/zhaowenting/Desktop/upload/pic/");
    }


}
